package cn.main.web;

import org.springframework.http.MediaType;
import org.springframework.http.converter.StringHttpMessageConverter;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;

/**
 * Author: chengwei
 * Date:   2016/7/5
 * Time:   14:56
 */
public class MyStringHttpMessageConverter extends StringHttpMessageConverter {

    private static final MediaType utf8 = new MediaType("text", "plain", Charset.forName("UTF-8"));

//    public MyStringHttpMessageConverter() {
//        super(DEFAULT_CHARSET);
//    }
    
    @Override
    protected MediaType getDefaultContentType(String s) throws IOException {
        return utf8;
    }
}
